import callFeedback from "@/components/common/modalFeedback";
import { CATEGORY } from "@/components/pages/wheel";
import { Button } from "antd-mobile";
import React from "react";

export default function FeedbackComp({item, actions, handler}) {
  console.log(item.icon.includes('pirze-8-big'))
  const m = callFeedback({
    bodyClassName: `price-result-modal act-feedback-modal`,
    // header: <>{CATEGORY[item?.category]?.feedback}</>,
    content: <div className="inner">
      <div className="header" style={{fontWeight:'bold'}} dangerouslySetInnerHTML={{__html:CATEGORY[item?.category]?.feedback}}>
        
      </div>
      <div className="header">{item?.name&&item.category!==5?`抽中${item.name}`:null}</div>
      <div className="thumb">
        {/* <img  className={item.icon.includes('prize-big-1.png')||item.icon.includes('prize-big-9.png') ? 'prize-big-1': ''} src={item.icon} alt="" /> */}
        <img  className={item.icon.includes('prize-5-big') ? 'prize-big-1': item.icon.includes('prize-6-big.png')?'prize-6-big':item.icon.includes('prize-7-big')?'prize-7-big':item.icon.includes('pirze-8-big')?'pirze-8-big':''} src={item.icon} alt="" />
      </div>
      
    </div>,
    actions: actions || [
      <Button key={`cancel`} onClick={e => {
        m.close()
        handler.prize()
      }} size={`small`} shape={`rounded`}
              className="act-btn act-btn-bevel">查看奖品</Button>
    ],
    closeOnAction: true,
    closeOnMaskClick: false,
  })

  return m
}